package com.ipoint.icompany.service;

import java.util.List;

import javax.persistence.EntityManager;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

import com.ipoint.icompany.model.Person;

@Name("personService")
@Scope(ScopeType.STATELESS)
public class PersonService {

	@In
	private EntityManager entityManager;

	@SuppressWarnings("unchecked")
	public List<Person> getPersonList() {
		return entityManager.createQuery("from Person p").getResultList();
	}

}
